# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[GridNavigatorEventHandler.__init__(self, player)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb776cfac>}
nname: 103
n 103(None)[context = dict(menu=self.player, selected=sel, parent=parent)
s = ActionMenu(context, type_='thumbnailaction', category='thumbnail_navigator', universe=self.player.universe)
s.show()
return True
]:
	i: 69(), 93()
	o: 

nname: 93
n 93(None)[parent = sel.parent
]:
	i: 0&56(f)
	o: 103()

nname: 69
n 69(None)[parent = self.player._history[-1]['selected']
]:
	i: 0&56(t)
	o: 103()

nname: 0&56
n 0&56(sel is None and self.player._history)[stack = pygui_globs['menustack']
from pygui.menu.menu import ActionMenu
sel = self.player.selected
parent = None
]:
	i: 
	o: 69(t), 93(f)

nname: 0&56
n 0&56(None)[stack = pygui_globs['menustack']
from pygui.menu.menu import ActionMenu
sel = self.player.selected
parent = None
if sel is None and self.player._history:
	parent = self.player._history[-1]['selected']
else:
	parent = sel.parent
context = dict(menu=self.player, selected=sel, parent=parent)
s = ActionMenu(context, type_='thumbnailaction', category='thumbnail_navigator', universe=self.player.universe)
s.show()
return True
]:
	i: 
	o: 

self.nodes: {'0&56': <unpyclib.structure.node instance at 0xb7770aec>}
nname: 0
n 0(None)[pygui_globs['menustack'].toggle()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb776cfac>}
nname: 103
n 103(None)[return True
]:
	i: 48(), 86()
	o: 

nname: 86
n 86(None)[GridNavigatorEventHandler.event_select(self, event)
]:
	i: 0&31(f)
	o: 103()

nname: 48
n 48(None)[text = _('To enter this folder, please go back to list mode.')
MessageWindow(text).show(timeout=5)
]:
	i: 0&31(t)
	o: 103()

nname: 0&31
n 0&31(isinstance(sel, DirItem) and not isinstance(sel, Playlist))[sel = self.player['main_list'].selected
]:
	i: 
	o: 48(t), 86(f)

nname: 0&31
n 0&31(None)[sel = self.player['main_list'].selected
if isinstance(sel, DirItem) and not isinstance(sel, Playlist):
	text = _('To enter this folder, please go back to list mode.')
	MessageWindow(text).show(timeout=5)
else:
	GridNavigatorEventHandler.event_select(self, event)
return True
]:
	i: 
	o: 

self.nodes: {'0&31': <unpyclib.structure.node instance at 0xb777062c>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb776ce8c>}
nname: 6
n 6(None)[__doc__ = 'Event manager for the thumbnail navigator.'
def __init__(self, player):
	GridNavigatorEventHandler.__init__(self, player)

def event_action_menu(self, event):
	stack = pygui_globs['menustack']
	from pygui.menu.menu import ActionMenu
	sel = self.player.selected
	parent = None
	if sel is None and self.player._history:
		parent = self.player._history[-1]['selected']
	else:
		parent = sel.parent
	context = dict(menu=self.player, selected=sel, parent=parent)
	s = ActionMenu(context, type_='thumbnailaction', category='thumbnail_navigator', universe=self.player.universe)
	s.show()
	return True

def event_toggle(self):
	pygui_globs['menustack'].toggle()
	return True

def event_select(self, event):
	sel = self.player['main_list'].selected
	if isinstance(sel, DirItem) and not isinstance(sel, Playlist):
		text = _('To enter this folder, please go back to list mode.')
		MessageWindow(text).show(timeout=5)
	else:
		GridNavigatorEventHandler.event_select(self, event)
	return True

def event_marker(self, event):
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb776cbec>}
nname: 0
n 0(None)[from __future__ import absolute_import
from .navigator_menu import GridNavigatorEventHandler
from pygui.item.mediaitem.core import DirItem, Playlist
from pygui.shared import pygui_globs
from pygui.window import MessageWindow
class ThumbnailNavigatorEventHandler(GridNavigatorEventHandler):
	__doc__ = 'Event manager for the thumbnail navigator.'
	def __init__(self, player):
		GridNavigatorEventHandler.__init__(self, player)

	def event_action_menu(self, event):
		stack = pygui_globs['menustack']
		from pygui.menu.menu import ActionMenu
		sel = self.player.selected
		parent = None
		if sel is None and self.player._history:
			parent = self.player._history[-1]['selected']
		else:
			parent = sel.parent
		context = dict(menu=self.player, selected=sel, parent=parent)
		s = ActionMenu(context, type_='thumbnailaction', category='thumbnail_navigator', universe=self.player.universe)
		s.show()
		return True

	def event_toggle(self):
		pygui_globs['menustack'].toggle()
		return True

	def event_select(self, event):
		sel = self.player['main_list'].selected
		if isinstance(sel, DirItem) and not isinstance(sel, Playlist):
			text = _('To enter this folder, please go back to list mode.')
			MessageWindow(text).show(timeout=5)
		else:
			GridNavigatorEventHandler.event_select(self, event)
		return True

	def event_marker(self, event):
		return True



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7763dcc>}
from __future__ import absolute_import
from .navigator_menu import GridNavigatorEventHandler
from pygui.item.mediaitem.core import DirItem, Playlist
from pygui.shared import pygui_globs
from pygui.window import MessageWindow
class ThumbnailNavigatorEventHandler(GridNavigatorEventHandler):
	__doc__ = 'Event manager for the thumbnail navigator.'
	def __init__(self, player):
		GridNavigatorEventHandler.__init__(self, player)

	def event_action_menu(self, event):
		stack = pygui_globs['menustack']
		from pygui.menu.menu import ActionMenu
		sel = self.player.selected
		parent = None
		if sel is None and self.player._history:
			parent = self.player._history[-1]['selected']
		else:
			parent = sel.parent
		context = dict(menu=self.player, selected=sel, parent=parent)
		s = ActionMenu(context, type_='thumbnailaction', category='thumbnail_navigator', universe=self.player.universe)
		s.show()
		return True

	def event_toggle(self):
		pygui_globs['menustack'].toggle()
		return True

	def event_select(self, event):
		sel = self.player['main_list'].selected
		if isinstance(sel, DirItem) and not isinstance(sel, Playlist):
			text = _('To enter this folder, please go back to list mode.')
			MessageWindow(text).show(timeout=5)
		else:
			GridNavigatorEventHandler.event_select(self, event)
		return True

	def event_marker(self, event):
		return True



